package com.hoshiicloud.user.entity.organization;

import com.hoshiicloud.common.validate.ValidGroupUpdate;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 机构表
 * </p>
 *
 * @author campchen
 * @since 2019-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ComOrganization implements Serializable {
    public static final long serialVersionUID = 1L;

    @NotNull(message = "主键ID不能为空", groups = {ValidGroupUpdate.class})
    @ApiModelProperty(name = "id", value = "ID", dataType = "java.lang.Long")
    private Long id;


    @ApiModelProperty(name = "companyId", value = "公司ID", required = true, dataType = "java.lang.Long", example = "3171776001692663893")
    private Long companyId;


    @ApiModelProperty(name = "orgCode", value = "供应商编码", required = true, dataType = "java.lang.String", example = "sdaadasd")
    private String orgCode;


    @ApiModelProperty(name = "departmentId", value = "负责部门ID", required = true, dataType = "java.lang.Long", example = "3171776001692665738")
    private Long departmentId;


    @ApiModelProperty(name = "organizationTypeId", value = "采购商类型（来源于采购商类型）来源 organization_type", required = true, dataType = "java.lang.Long", example = "3171776001692662345")
    private Long organizationTypeId;


    @NotNull(message = "采购商类型不能为空")
    @ApiModelProperty(name = "type", value = "0-跨境供应商 1-国内供应商", required = true, dataType = "java.lang.Long", example = "3171776001692662345")
    private Integer type;


    @ApiModelProperty(name = "parentId", value = "上级机构", required = true, example = "1000000000000000010")
    private Long parentId;

    /**
     * 采购商名称
     */
    @NotNull(message = "采购商名称不能为空")
    @ApiModelProperty(name = "name", value = "采购商名称", required = true, dataType = "java.lang.String", example = "XXX采购商")
    private String name;

    /**
     * 负责人
     */
    @NotNull(message = "负责人不能为空")
    @ApiModelProperty(name = "charge", value = "负责人", required = true, dataType = "java.lang.String", example = "里斯本")
    private String charge;

    /**
     * 身份证号码
     */
    @NotNull(message = "身份证号码不能为空")
    //@IdCard(message = "请输入正确的省份证号码")
    @ApiModelProperty(name = "idCard", value = "身份证号码", required = true, dataType = "java.lang.String", example = "420324198705030092")
    private String idCard;

    @ApiModelProperty(name = "accountType", value = "账户类型 1-企业账户 2-个人账户")
    private Integer accountType;

    @ApiModelProperty(name = "accountName", value = "户名(开户名称)")
    private String accountName;

    /**
     * 对公帐号
     */
    @NotNull(message = "对公帐号不能为空")
    //@IsNumber(message = "对公帐号只能为数字，请输入正确的对公帐号")
    @ApiModelProperty(name = "bankNumber", value = "对公帐号", required = true, dataType = "java.lang.String", example = "6225882106335893")
    private String bankNumber;

    /**
     * 银行名称
     */
    @NotNull(message = "银行名称不能为空")
    @ApiModelProperty(name = "bankName", value = "银行名称", required = true, dataType = "java.lang.String", example = "中国建设银行")
    private String bankName;

    /**
     * 所在支行
     */
    @NotNull(message = "所在支行不能为空")
    @ApiModelProperty(name = "bankAddress", value = "所在支行", required = true, dataType = "java.lang.String", example = "中国建设银行马尾支行")
    private String bankAddress;

    /**
     * 税务登记号
     */
    @NotNull(message = "税务登记号不能为空")
    @ApiModelProperty(name = "taxation", value = "税务登记号", required = true, dataType = "java.lang.String", example = "440330584063792")
    private String taxation;

    /**
     * 开票号
     */
    @NotNull(message = "开票号不能为空")
    @ApiModelProperty(name = "piaohao", value = "开票号", required = true, dataType = "java.lang.String", example = "12312312321")
    private String piaohao;

    /**
     * 发货地址
     */
    @NotNull(message = "发货地址不能为空")
    @ApiModelProperty(name = "goodsAddress", value = "发货地址", required = true, dataType = "java.lang.String", example = "福建省内福州市马尾区世创大厦3楼")
    private String goodsAddress;

    /**
     * 仓库地址
     */
    @NotNull(message = "仓库地址不能为空")
    @ApiModelProperty(name = "whouseAddress", value = "仓库地址", required = true, dataType = "java.lang.String", example = "福建省福州市马尾区世创大厦3楼")
    private String whouseAddress;

    /**
     * 结算方式-settlement
     */
    @NotNull(message = "结算方式不能为空")
    @ApiModelProperty(name = "paymentId", value = "结算方式", required = true, dataType = "java.lang.Long", example = "1")
    private Long paymentId;

    /**
     * 电话号码
     */
    @NotNull(message = "电话号码不能为空")
    // @Telephone(message = "请输入正确的电话号码")
    @ApiModelProperty(name = "telphone", value = "电话号码", required = true, dataType = "java.lang.String", example = "0591-8786098")
    private String telphone;

    /**
     * 手机号码
     */
    @NotNull(message = "手机号码不能为空")
    //@Mobile(message = "请输入正确的手机号码")
    @ApiModelProperty(name = "mobile", value = "手机号码", required = true, dataType = "java.lang.String", example = "13997807009")
    private String mobile;

    /**
     * 传真
     */
    @NotNull(message = "传真不能为空")
    //@Fax(message = "请输入正确的传真号码")
    @ApiModelProperty(name = "fax", value = "传真", required = true, dataType = "java.lang.String", example = "0591-8786098")
    private String fax;

    /**
     * 主页
     */
    @NotNull(message = "主页不能为空")
    //@URL(message = "请输入正确的主页地址")
    @ApiModelProperty(name = "home", value = "主页", required = true, dataType = "java.lang.String", example = "http://www.github.com/maiboyc")
    private String home;

    /**
     * 邮件
     */
    @NotNull(message = "邮件不能为空")
    @Email(message = "请输入正确的邮箱地址")
    @ApiModelProperty(name = "email", value = "邮件", required = true, dataType = "java.lang.String", example = "maiboyc@163.com")
    private String email;

    /**
     * 公司地址
     */
    @NotNull(message = "公司地址不能为空")
    @ApiModelProperty(name = "address", value = "公司地址", required = true, dataType = "java.lang.String", example = "福建省福州市马尾区世创大厦3楼")
    private String address;

    @ApiModelProperty(name = "applyType", value = "申请人类型 1-法定代表人 2-经营负责人")
    private Integer applyType;

    @ApiModelProperty(name = "applyIdNumber", value = "申请人身份证号码")
    private String applyIdNumber;

    @ApiModelProperty(name = "applyName", value = "申请人姓名")
    private String applyName;

    @ApiModelProperty(name = "applyAddress", value = "申请人地址")
    private String applyAddress;

    @ApiModelProperty(name = "applyIssuedby", value = "申请人签发机关")
    private String applyIssuedby;

    @ApiModelProperty(name = "applySex", value = "申请人性别")
    private String applySex;

    @ApiModelProperty(name = "applyBirthplace", value = "申请人籍贯")
    private String applyBirthplace;

    @ApiModelProperty(name = "applyBirth", value = "申请人出生日期")
    private String applyBirthday;

    @ApiModelProperty(name = "applyIdFront", value = "申请人身份证正面")
    private String applyIdFront;

    @ApiModelProperty(name = "applyIdBack", value = "申请人身份证反面")
    private String applyIdBack;

    private LocalDateTime createdTime;
    private LocalDateTime modifiedTime;
    private String createdBy;
    private String modifiedBy;
    /**
     * 状态 0-未审批 1-已审批 2-已终止合作
     */
    @ApiModelProperty(name = "status", value = "状态", required = true, dataType = "java.lang.Integer", example = "1")
    private Integer status;

    /**
     * 账户可用余额
     */
    @ApiModelProperty(name = "availableBalance", value = "账户可用余额")
    private BigDecimal availableBalance;

    /**
     * 账户总额
     */
    @ApiModelProperty(name = "accountBalance", value = "账户总额")
    private BigDecimal accountBalance;

    /**
     * 冻结金额
     */
    @ApiModelProperty(name = "freezingAmount", value = "冻结金额")
    private BigDecimal freezingAmount;

    @ApiModelProperty(name = "chargeTelphone", value = "负责人电话")
    private String chargeTelphone;

    @ApiModelProperty(name = "chargeWeixin", value = "负责人微信")
    private String chargeWeixin;

    @ApiModelProperty(name = "chargeEmail", value = "负责人邮箱")
    private String chargeEmail;

    @ApiModelProperty(name = "province", value = "省份")
    private Integer province;

    @ApiModelProperty(name = "provinceName", value = "省份名")
    private String provinceName;

    @ApiModelProperty(name = "city", value = "城市")
    private Integer city;

    @ApiModelProperty(name = "cityName", value = "城市名称")
    private String cityName;

    @ApiModelProperty(name = "district", value = "地区")
    private Integer district;

    @ApiModelProperty(name = "districtName", value = "地区名")
    private String districtName;

    @ApiModelProperty(name = "street", value = "街道")
    private Integer street;

    @ApiModelProperty(name = "streetName", value = "街道名")
    private String streetName;

    /**
     * 推荐人ID  来源于 合作伙伴
     */
    @ApiModelProperty(name = "referrerId", value = "推荐人")
    private Long referrerId;

    @ApiModelProperty(name = "contacts", value = "联系人")
    @NotNull(message = "联系人不能为空")
    private String contacts;

    @ApiModelProperty(name = "invitedCode", value = "邀请码")
    @NotNull(message = "邀请码不能为空")
    private String invitedCode;

    @ApiModelProperty(name = "weixin", value = "微信号")
    @NotNull(message = "微信号不能为空")
    private String weixin;

    @ApiModelProperty(name = "profile", value = "公司简介")
    @NotNull(message = "公司简介不能为空")
    private String profile;


}
